version: "3.9"

networks:
  postgres:

services:
  postgres:
    image: postgres
    container_name: postgres
    hostname: postgres-host
    restart: always
    volumes:
      - "./postgres_data:/var/lib/postgres"
    environment:
      POSTGRES_PASSWORD: "qwerty"
      POSTGRES_DB: "server"
    networks:
      - postgres
    ports:
      - "5437:5432"

volumes:
  postgres_data:

